#!/usr/bin/env bash

cd /opt/source/life

git pull

mvn clean install -DskipTests -f pom.xml
mv portal/target/portal.jar /opt/source/life

ps -ef |grep java |grep portal.jar  |grep -v 'grep'|awk '{print $2}'  | xargs kill -9

nohup java -jar portal.jar --spring.profiles.active=prod > portal.out  &
